<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo Yii::app()->params["app"]["name"] ?>，我的云盘！ 爱分享 云生活</title>
<script src="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/js/jquery_min.js?v=<?php echo(Yii::app()->params['app']['version'])?>" type="text/javascript"></script>
<script type="text/javascript">document.domain=window.location.host;</script>
<link rel="stylesheet" type="text/css" href="<?php echo(Yii::app()->params['app']['host'])?>/statics/web/setting/css/style.css?v=<?php echo(Yii::app()->params['app']['version'])?>" media="all" />
<style type="text/css">
	.s-hidden{
		display:none;
	}
</style>
</head>
<body>
<div class="s-con">
	<div class="s-tip"><span class="s-t-icon s-tip-icon"></span><i class="s-tip-l"></i><i class="s-tip-r"></i>绑定微博帐号后，您可以使用“分享到微博”的功能把资源快速分享到多个微博，可以快速获取大量粉丝！</div>

	<div class="s-bg">
		<div class="s-bg-con">
			<ul class="s-w-list">
				<li class="s-w-li">
					<span class="w-icon w-qq w-qq-active"></span>
					<div class="s-w-name">
						<strong class="f14">腾讯微博</strong>
						<div class="w-qq-info s-hidden">

						<p>已绑定帐号：<span class="w-qq-name"></span></p>
						<a href="http://open.miniyun.com/wbt/?ct=tqq&ac=api_unbind&url=http%3A%2F%2Fmy.miniyun.com%3Fct%3Daccount%26ac%3Dwb">解除绑定</a>
						</div>
                        <p class="w-qq-bind s-hidden"><a class="circle-btn circle-btn-blue" href="http://open.miniyun.com/wbt/?ct=tqq&ac=api_bind&url=http%3A%2F%2Fmy.miniyun.com%3Fct%3Daccount%26ac%3Dwb"><span>立即绑定</span></a></p>
					</div>
				</li>
				<li class="s-w-li">

					<span class="w-icon w-sina"></span>
					<div class="s-w-name">
						<strong class="f14">新浪微博</strong>
						<div class="w-sina-info s-hidden">
							<p>已绑定帐号：<span class="w-sina-name"></span></p>
							<a href="http://open.miniyun.com/wbt/?ct=tsina&ac=api_unbind&url=http%3A%2F%2Fmy.miniyun.com%3Fct%3Daccount%26ac%3Dwb">解除绑定</a>
						</div>

						<p class="w-sina-bind s-hidden"><a class="circle-btn circle-btn-blue" href="http://open.miniyun.com/wbt/?ct=tsina&ac=api_bind&url=http%3A%2F%2Fmy.miniyun.com%3Fct%3Daccount%26ac%3Dwb" ><span>立即绑定</span></a></p>
					</div>
				</li>
				<li class="s-w-li s-w-li-last">
					<span class="w-icon w-163"></span>
					<div class="s-w-name">
						<strong class="f14">网易微博</strong>
						<div class="w-163-info s-hidden">

							<p>已绑定帐号：<span class="w-163-name"></span></p>
                            <a href="http://open.miniyun.com/wbt/?ct=t163&ac=api_unbind&url=http%3A%2F%2Fmy.miniyun.com%3Fct%3Daccount%26ac%3Dwb">解除绑定</a>
						</div>
                        <p class="w-163-bind s-hidden"><a class="circle-btn circle-btn-blue" href="http://open.miniyun.com/wbt/?ct=t163&ac=api_bind&url=http%3A%2F%2Fmy.miniyun.com%3Fct%3Daccount%26ac%3Dwb" ><span>立即绑定</span></a></p>
					</div>
				</li>
			</ul>

		</div>
	</div>
</div>
<script>
    var wbt_url = "http://open.miniyun.com/wbt/?ct=weibo&ac=api_weibo&js_return=wb_status"
    $.getScript(wbt_url,function(){
		//console.log(wb_status)
        if(wb_status.status){
			var weiboList=["qq","163","sina","sohu"];
			$.each(weiboList,function(i,n){
				if(wb_status.info["t"+n].is_bind){
					//active class
					$(".w-"+n).addClass("w-"+n+"-active");
					//显示绑定帐号
					$(".w-"+n+"-name").text(wb_status.info["t"+n].name);
					//显示绑定帐号信息
					$(".w-"+n+"-info").show();
					//隐藏立即绑定按钮
					$(".w-"+n+"-bind").hide();
				}else{
					$(".w-"+n).removeClass("w-"+n+"-active");
					//隐藏绑定帐号信息
					$(".w-"+n+"-info").hide();
					//显示
					$(".w-"+n+"-bind").show();
				}
			});
        }
        else{
            // 出错
        }
    });
</script>
<script type="text/javascript">
	document.domain=window.location.host;
	$(function(){
		if(!parent.window.isFrame && parent.window.location.hash == ""){
			var href=window.location.href;
			window.location.href="<?php echo(Yii::app()->params['app']['host'])?>/index.php?r=setting/index&ac="+window.location.href.substring(href.indexOf("=")+1,href.length);
		}
	})
</script></body>
</html>
